Optimal. Leaf size=361 \[ a b c^2 d^3 x+b^2 c^2 d^3 x \tanh ^{-1}(c x)+\frac {7}{2} c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+6 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )-6 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )+\frac {1}{2} b^2 c d^3 \log \left (1-c^2 x^2\right )+2 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )-3 b^2 c d^3 \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )-3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )+3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,-1+\frac {2}{1-c x}\right )-b^2 c d^3 \text {PolyLog}\left (2,-1+\frac {2}{1+c x}\right )+\frac {3}{2} b^2 c d^3 \text {PolyLog}\left (3,1-\frac {2}{1-c x}\right )-\frac {3}{2} b^2 c d^3 \text {PolyLog}\left (3,-1+\frac {2}{1-c x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.55, antiderivative size = 361, normalized size of antiderivative = 1.00, number of steps
used = 23, number of rules used = 17, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.773, Rules used = {6087, 6021,
6131, 6055, 2449, 2352, 6037, 6135, 6079, 2497, 6033, 6199, 6095, 6205, 6745, 6127, 266}
\begin {gather*} \frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+a b c^2 d^3 x+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2-3 b c d^3 \text {Li}_2\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )+3 b c d^3 \text {Li}_2\left (\frac {2}{1-c x}-1\right ) \left (a+b \tanh ^{-1}(c x)\right )+\frac {7}{2} c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+6 c d^3 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2-6 b c d^3 \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )+2 b c d^3 \log \left (2-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{2} b^2 c d^3 \log \left (1-c^2 x^2\right )+b^2 c^2 d^3 x \tanh ^{-1}(c x)-3 b^2 c d^3 \text {Li}_2\left (1-\frac {2}{1-c x}\right )-b^2 c d^3 \text {Li}_2\left (\frac {2}{c x+1}-1\right )+\frac {3}{2} b^2 c d^3 \text {Li}_3\left (1-\frac {2}{1-c x}\right )-\frac {3}{2} b^2 c d^3 \text {Li}_3\left (\frac {2}{1-c x}-1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 2352
Rule 2449
Rule 2497
Rule 6021
Rule 6033
Rule 6037
Rule 6055
Rule 6079
Rule 6087
Rule 6095
Rule 6127
Rule 6131
Rule 6135
Rule 6199
Rule 6205
Rule 6745
Rubi steps
\begin {align*} \int \frac {(d+c d x)^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x^2} \, dx &=\int \left (3 c^2 d^3 \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x^2}+\frac {3 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+c^3 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2\right ) \, dx\\ &=d^3 \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x^2} \, dx+\left (3 c d^3\right ) \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x} \, dx+\left (3 c^2 d^3\right ) \int \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx+\left (c^3 d^3\right ) \int x \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx\\ &=-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+6 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )+\left (2 b c d^3\right ) \int \frac {a+b \tanh ^{-1}(c x)}{x \left (1-c^2 x^2\right )} \, dx-\left (12 b c^2 d^3\right ) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx-\left (6 b c^3 d^3\right ) \int \frac {x \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx-\left (b c^4 d^3\right ) \int \frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx\\ &=4 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+6 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )+\left (2 b c d^3\right ) \int \frac {a+b \tanh ^{-1}(c x)}{x (1+c x)} \, dx+\left (b c^2 d^3\right ) \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx-\left (b c^2 d^3\right ) \int \frac {a+b \tanh ^{-1}(c x)}{1-c^2 x^2} \, dx-\left (6 b c^2 d^3\right ) \int \frac {a+b \tanh ^{-1}(c x)}{1-c x} \, dx+\left (6 b c^2 d^3\right ) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx-\left (6 b c^2 d^3\right ) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx\\ &=a b c^2 d^3 x+\frac {7}{2} c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+6 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )-6 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )+2 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )-3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )+3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )+\left (b^2 c^2 d^3\right ) \int \tanh ^{-1}(c x) \, dx-\left (2 b^2 c^2 d^3\right ) \int \frac {\log \left (2-\frac {2}{1+c x}\right )}{1-c^2 x^2} \, dx+\left (3 b^2 c^2 d^3\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx-\left (3 b^2 c^2 d^3\right ) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx+\left (6 b^2 c^2 d^3\right ) \int \frac {\log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx\\ &=a b c^2 d^3 x+b^2 c^2 d^3 x \tanh ^{-1}(c x)+\frac {7}{2} c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+6 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )-6 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )+2 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )-3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )+3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )-b^2 c d^3 \text {Li}_2\left (-1+\frac {2}{1+c x}\right )+\frac {3}{2} b^2 c d^3 \text {Li}_3\left (1-\frac {2}{1-c x}\right )-\frac {3}{2} b^2 c d^3 \text {Li}_3\left (-1+\frac {2}{1-c x}\right )-\left (6 b^2 c d^3\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-c x}\right )-\left (b^2 c^3 d^3\right ) \int \frac {x}{1-c^2 x^2} \, dx\\ &=a b c^2 d^3 x+b^2 c^2 d^3 x \tanh ^{-1}(c x)+\frac {7}{2} c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {d^3 \left (a+b \tanh ^{-1}(c x)\right )^2}{x}+3 c^2 d^3 x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {1}{2} c^3 d^3 x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+6 c d^3 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )-6 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )+\frac {1}{2} b^2 c d^3 \log \left (1-c^2 x^2\right )+2 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )-3 b^2 c d^3 \text {Li}_2\left (1-\frac {2}{1-c x}\right )-3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )+3 b c d^3 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )-b^2 c d^3 \text {Li}_2\left (-1+\frac {2}{1+c x}\right )+\frac {3}{2} b^2 c d^3 \text {Li}_3\left (1-\frac {2}{1-c x}\right )-\frac {3}{2} b^2 c d^3 \text {Li}_3\left (-1+\frac {2}{1-c x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.36, size = 479, normalized size = 1.33 \begin {gather*} \frac {d^3 \left (-8 a^2+i b^2 c \pi ^3 x+24 a^2 c^2 x^2+8 a b c^2 x^2+4 a^2 c^3 x^3-16 a b \tanh ^{-1}(c x)+48 a b c^2 x^2 \tanh ^{-1}(c x)+8 b^2 c^2 x^2 \tanh ^{-1}(c x)+8 a b c^3 x^3 \tanh ^{-1}(c x)-8 b^2 \tanh ^{-1}(c x)^2-20 b^2 c x \tanh ^{-1}(c x)^2+24 b^2 c^2 x^2 \tanh ^{-1}(c x)^2+4 b^2 c^3 x^3 \tanh ^{-1}(c x)^2-16 b^2 c x \tanh ^{-1}(c x)^3+16 b^2 c x \tanh ^{-1}(c x) \log \left (1-e^{-2 \tanh ^{-1}(c x)}\right )-48 b^2 c x \tanh ^{-1}(c x) \log \left (1+e^{-2 \tanh ^{-1}(c x)}\right )-24 b^2 c x \tanh ^{-1}(c x)^2 \log \left (1+e^{-2 \tanh ^{-1}(c x)}\right )+24 b^2 c x \tanh ^{-1}(c x)^2 \log \left (1-e^{2 \tanh ^{-1}(c x)}\right )+24 a^2 c x \log (x)+16 a b c x \log (c x)+4 a b c x \log (1-c x)-4 a b c x \log (1+c x)+16 a b c x \log \left (1-c^2 x^2\right )+4 b^2 c x \log \left (1-c^2 x^2\right )+24 b^2 c x \left (1+\tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )-8 b^2 c x \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(c x)}\right )+24 b^2 c x \tanh ^{-1}(c x) \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(c x)}\right )-24 a b c x \text {PolyLog}(2,-c x)+24 a b c x \text {PolyLog}(2,c x)+12 b^2 c x \text {PolyLog}\left (3,-e^{-2 \tanh ^{-1}(c x)}\right )-12 b^2 c x \text {PolyLog}\left (3,e^{2 \tanh ^{-1}(c x)}\right )\right )}{8 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 7.06, size = 1239, normalized size = 3.43
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1239\) |
default | \(\text {Expression too large to display}\) | \(1239\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} d^{3} \left (\int 3 a^{2} c^{2}\, dx + \int \frac {a^{2}}{x^{2}}\, dx + \int \frac {3 a^{2} c}{x}\, dx + \int a^{2} c^{3} x\, dx + \int 3 b^{2} c^{2} \operatorname {atanh}^{2}{\left (c x \right )}\, dx + \int \frac {b^{2} \operatorname {atanh}^{2}{\left (c x \right )}}{x^{2}}\, dx + \int 6 a b c^{2} \operatorname {atanh}{\left (c x \right )}\, dx + \int \frac {2 a b \operatorname {atanh}{\left (c x \right )}}{x^{2}}\, dx + \int \frac {3 b^{2} c \operatorname {atanh}^{2}{\left (c x \right )}}{x}\, dx + \int b^{2} c^{3} x \operatorname {atanh}^{2}{\left (c x \right )}\, dx + \int \frac {6 a b c \operatorname {atanh}{\left (c x \right )}}{x}\, dx + \int 2 a b c^{3} x \operatorname {atanh}{\left (c x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2\,{\left (d+c\,d\,x\right )}^3}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________